import { useI18n } from "vue-i18n";

export const DEBOUNCED_TIME = 400;

export interface FloatNavigationEdit {
  /**
     * 内容
     */
  content: string;
  /**
     * 内容类型 text image
     */
  contentType: 'text' | 'image';
  /**
     * 展示状态，0 不展示 1展示
     */
  displayStatus: 0 | 1;
  /**
     * ID 编号
     */
  id: number;
  /**
     * 链接
     */
  link: string;
  /**
     * 名称
     */
  name: string;
  /**
     * 图标地址
     */
  pic: string;
  [property: string]: any;
}

type Nullable<T> = T | null;

export interface ResponseData {
  id: number;
  communityId: number;
  name: string;
  pic: string;
  content: string;
  contentType: string;
  contentCategory: string;
  link: string;
  position: number;
  displayStatus: 0 | 1;
  createName: Nullable<string>;
  createTime: Nullable<string>;
  updateName: Nullable<string>;
  updateTime: Nullable<string>;
}

export function useLabelList() {
  const { t } = useI18n();

  return {
    telephone: t('settings.view.floatNavigation.edit.title1'),
    email: t('settings.view.floatNavigation.edit.title2'),
    feedback: t('settings.view.floatNavigation.edit.title3'),
    wechat: t('settings.view.floatNavigation.edit.title4'),
  };
}
